Overview | Package | Class | Tree | Deprecated | Index | Help Java Platform
1.1.7
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class com.sun.java.swing.DefaultCellEditor

java.lang.Object
  |
  +--com.sun.java.swing.DefaultCellEditor

public class DefaultCellEditor
extends java.lang.Object
implements TableCellEditor, TreeCellEditor, java.io.Serializable
The default editor for table and tree cells.

Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.

See Also:
Serialized Form

Inner Class Summary
DefaultCellEditor.EditorDelegate
           
 
Field Summary
ChangeEvent changeEvent
           
int clickCountToStart
           
DefaultCellEditor.EditorDelegate delegate
           
JComponent editorComponent
           
EventListenerList listenerList
          Event listeners
 
Constructor Summary
DefaultCellEditor(JTextField x)
           
DefaultCellEditor(JCheckBox x)
           
DefaultCellEditor(JComboBox x)
           
 
Method Summary
void addCellEditorListener(CellEditorListener l)
           
void cancelCellEditing()
           
void fireEditingCanceled()
           
void fireEditingStopped()
           
java.lang.Object getCellEditorValue()
           
int getClickCountToStart()
          clickCountToStart controls the number of clicks required to start editing if the event passed to isCellEditable() or startCellEditing() is a MouseEvent.
java.awt.Component getComponent()
           
java.awt.Component getTableCellEditorComponent(JTable table, java.lang.Object value, boolean isSelected, int row, int column)
           
java.awt.Component getTreeCellEditorComponent(JTree tree, java.lang.Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
           
boolean isCellEditable(java.util.EventObject anEvent)
           
void removeCellEditorListener(CellEditorListener l)
           
void setClickCountToStart(int count)
           
boolean shouldSelectCell(java.util.EventObject anEvent)
           
boolean stopCellEditing()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Field Detail

listenerList

protected EventListenerList listenerList
Event listeners

changeEvent

protected transient ChangeEvent changeEvent

editorComponent

protected JComponent editorComponent

delegate

protected DefaultCellEditor.EditorDelegate delegate

clickCountToStart

protected int clickCountToStart
Constructor Detail

DefaultCellEditor

public DefaultCellEditor(JTextField x)

DefaultCellEditor

public DefaultCellEditor(JCheckBox x)

DefaultCellEditor

public DefaultCellEditor(JComboBox x)
Method Detail

getComponent

public java.awt.Component getComponent()

setClickCountToStart

public void setClickCountToStart(int count)

getClickCountToStart

public int getClickCountToStart()
clickCountToStart controls the number of clicks required to start editing if the event passed to isCellEditable() or startCellEditing() is a MouseEvent. For example, by default the clickCountToStart for a JTextField is set to 2, so in a JTable the user will need to double click to begin editing a cell.

getCellEditorValue

public java.lang.Object getCellEditorValue()

isCellEditable

public boolean isCellEditable(java.util.EventObject anEvent)

shouldSelectCell

public boolean shouldSelectCell(java.util.EventObject anEvent)

stopCellEditing

public boolean stopCellEditing()

cancelCellEditing

public void cancelCellEditing()

addCellEditorListener

public void addCellEditorListener(CellEditorListener l)

removeCellEditorListener

public void removeCellEditorListener(CellEditorListener l)

fireEditingStopped

protected void fireEditingStopped()

fireEditingCanceled

protected void fireEditingCanceled()

getTreeCellEditorComponent

public java.awt.Component getTreeCellEditorComponent(JTree tree,
                                            java.lang.Object value,
                                            boolean isSelected,
                                            boolean expanded,
                                            boolean leaf,
                                            int row)
Description copied from interface:
Sets an initial value for the editor. This will cause the editor to stopEditing and lose any partially edited value if the editor is editing when this method is called.

Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input.

Specified by:
getTreeCellEditorComponent in interface TreeCellEditor

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(JTable table,
                                             java.lang.Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
Description copied from interface:
Sets an initial value for the editor. This will cause the editor to stopEditing and lose any partially edited value if the editor is editing when this method is called.

Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input.

Specified by:
getTableCellEditorComponent in interface TableCellEditor

Overview | Package | Class | Tree | Deprecated | Index | Help Java Platform
1.1.7
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Submit a bug or feature
Submit comments/suggestions about javadoc
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.